# -*- coding: utf-8 -*-
# @Time    : 2019/1/2 10:40
# @Author  : Zachary
# @File    : url_manager.py
# url调度管理
class UrlManager(object):

    def __init__(self):
        self.new_urls = set()
        self.old_urls = set()

    def add_new_url(self):
        """
        添加一个新的链接
        :return:
        """
        pass

    def has_new_url(self):
        """
        还有没有新的待爬取的url
        :return:
        """
        pass

    def get_new_url(self):
        """
        取一个新的url准备请求它
        :return:
        """
        pass

    def add_new_urls(self,urls):
        """
        一个词条页面上所有的链接添加入self.new_urls中
        :param urls:
        :return:
        """
        pass